package com.itheima.method;

public class DemoMethod {
    public static void main(String[] args) {
        round(3.56);
    }
    public static void round(double d){
        int zsNum = (int)d;
        double xsNum = d - zsNum;
        System.out.println(xsNum >= 0.5 ? (zsNum + 1): ( d -xsNum));

        }
    }

